from base.bases import BasePage
import time


class IndexPage(BasePage):

    def login(self, username, password):

        self.get_url('testUrl','url')
        # 调用yaml文件中的方法
        self.input_text(username,*self.name)    # 输入用户名
        self.input_text(password,*self.password)  # 输入密码
        time.sleep(3)  # 等待10秒(输入验证码)
        self.click(*self.but_login)
        time.sleep(3)
        self.click(*self.jiaqncha)


    # def assert_message(self):
    #     success_message = self.find_element(*self.dy)
    #     return success_message
